import { useState } from 'react'
import Modal from './components/common/modal'
// import './App.css'

function App() {
  const [visible,setVisible] = useState(false);
  const onMadalClose = () => {
    console.log('onMadalClose');
    setVisible(false)
  }
  const onMadalConfirm = () => {
    console.log('onMadalConfirm');
    setVisible(false)
  }

  return (
    <div className="App">
      <Modal visible={visible} title="登陆" onClose={onMadalClose} onConfirm={onMadalConfirm}>
        <div>
          <h3>这里是自定义内容区域</h3>
          <p>!!!!!!</p>
        </div>
      </Modal>
      <button onClick={()=>setVisible(true)}>click here</button>
    </div>
  )
}

export default App
